<include file="Public/header"/>
<include file="Public/menu"/>

<!-- 内容页 -->
<div class="content-wrapper">
    <!-- 面包屑 -->
    <section class="content-header">
        <h1>
            {$title}
            <small>{$title_two}</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> {$title}</a></li>
            <li class="active">{$title_two}</li>
        </ol>
    </section>
    <!-- 内容 -->
    <section class="content">

        <div class="tab-content">
            <div class="tab-pane active" id="tab_0">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title"></h3>
                        <div class="form-inline pull-right">
                            <form action="{:U('Feedback/index')}" method="get" pjax-container="">
                                <input type="hidden" name="local_id" value="{$local_id}">
                                <fieldset>
                                    <div class="input-group input-group-sm" id="rushTime">
                                        <label class="input-group-addon col-xm-4"><strong>投诉日期</strong></label>
                                        <div class="col-sm-12 input-group-sm" style="padding: 0;">
                                            <input type="text" class="col-xm-6 form-control" style="border-radius: 0;" id="posttime" name="begintime" value="{$begintime}" data-rule="required;">
                                            <span class="col-xm-1 form-control" style="padding: 5px; border: none;">--</span>
                                            <input type="text" class="col-xm-6 form-control" id="business_endtime" name="endtime" value="{$endtime}" data-rule="required;">
                                        </div>
                                    </div>

                                    <div class="input-group input-group-sm" style="margin-right: 20px">
                                        <span class="input-group-addon"><strong>处理状态</strong>
                                        </span>
                                        <select name="adm_status" class="form-control">
                                            <option value="0" <if condition="$adm_status eq '0' "> selected = "selected"</if>>全部</option>
                                            <option value="false" <if condition="$adm_status eq 'false' "> selected = "selected"</if>>未处理</option>
                                            <option value="true" <if condition="$adm_status eq 'true' "> selected = "selected"</if>>已处理</option>
                                        </select>
                                    </div>

                                    <select class="form-control" name="select" style="height: 30px; font-size: 12px;">
                                        <option value="id" <if condition="$select eq 'id' "> selected = "selected"</if>>ID</option>
                                        <option value="name" <if condition="$select eq 'name' "> selected = "selected"</if>>姓名</option>
                                    </select>
                                    <div class="input-group input-group-sm">
                                        <div class="input-group input-group-sm">
                                            <input type="text" class="form-control" placeholder="" name="value" value="{$value}">
                                        </div>
                                    </div>

                                    <div class="input-group input-group-sm">
                                        <div class="input-group-btn">
                                            <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i>
                                            </button>
                                        </div>
                                    </div>
                                </fieldset>
                            </form>
                        </div>

                    </div>
                    <!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <tbody>
                            <tr>
                                <th><input type="checkbox" class="grid-select-all"></th>
                                <th>ID<a id="a_order" rank='{$rank}' onclick="rankId('id','{$rank}')" class="fa fa-fw fa-sort" href="javascript:void(0);"></a>
                                </th>
                                <th>姓名</th>
                                <th>反馈类型</th>
                                <th>标题</th>
                                <th>手机</th>
                                <th>反馈时间</th>
                                <th>处理标识</th>
                                <th>内容</th>
                                <th>操作</th>
                            </tr>
                            <foreach name="list" item="vo" >
                                <tr>
                                    <td><input type="checkbox" class="grid-item" data-id="{$vo.feedback_id}"></td>
                                    <td>{$vo.feedback_id}</td>
                                    <td>{$vo.author}</td>
                                    <td>{:search(array('system'=>'系统','order'=>'订单','service'=>'服务','other'=>'其它'),$vo['feedback_type'])}</td>
                                    <td>{$vo.title}</td>
                                    <td>{$vo.mobile}</td>
                                    <td>{$vo.time|date='Y-m-d H:i:s',###}</td>
                                    <td>{:search(array('false'=>'未处理','true'=>'已处理'),$vo['adm_status'])}</td>
                                    <td>{$vo.comment}</td>

                                    <td>
                                        <if condition="$vo['adm_status'] eq 'false' ">
                                        <a href="{:U('Feedback/saveFeedback',['id'=>$vo[feedback_id]])}" class="btn btn-sm btn-primary grid-refreshe">处理</a>&nbsp;&nbsp;

                                        </if>

                                    </td>
                                </tr>
                            </foreach>

                            </tbody>
                        </table>
                    </div>
                    <div class="box-footer clearfix">
                        <!--<input type="checkbox" class="grid-select-all">&nbsp;&nbsp;&nbsp;
                        <a class="btn btn-sm btn-danger batch-delete">Batch delete</a>-->
                        {$page}
                    </div>
                    <!-- /.box-body -->
                </div>
            </div>

        </div>
    </section>
</div>
<!-- 底部 -->
<include file="Public/common_footer"/>
<script type="text/javascript" src="/Public/admin/calendar/calendar.js"></script>
<link rel="stylesheet" type="text/css" href="/Public/admin/calendar/calendar-blue.css"/>

<script>

    var rankId = function(ran,order){
        window.location.href="{:U('Feedback/index',['begintime'=>$begintime,'endtime'=>$endtime,'adm_status'=>$adm_status,'select'=>$select,'value'=>$value])}?"+ran+"="+order;
    }


    //时间控件
    date = new Date();
    Calendar.setup({
        inputField: "posttime",
        ifFormat: "%Y-%m-%d",
        showsTime: true,
        timeFormat: "24"
    });
    Calendar.setup({
        inputField: "business_endtime",
        ifFormat: "%Y-%m-%d",
        showsTime: true,
        timeFormat: "24"
    });
</script>